//
//  LXStatisticsListViewController.m
//  ZuLinProject
//
//  Created by bancheng on 2022/9/5.
//  Copyright © 2022 LX_App. All rights reserved.
//

#import "LXStatisticsListViewController.h"
#import "LXStatisticsListTableViewCell.h"
#import "LXTimeChooseView.h"
#import "LXDepositApplyViewController.h"
#import "LXDepositModel.h"
#import "CheLiangDetailViewController.h"
#import "LXStatisticsScreenView.h"
#import "LXStatisticsModel.h"
#import "LXStatisticsPaymentCategoryView.h"
#import "LXYearCheckTableViewCell.h"
#import "LXCWApplyViewController.h"
#import "LXCWDetailViewController.h"
#import "LXSignContractDetailViewController.h"
@interface LXStatisticsListViewController ()<UITableViewDelegate,UITableViewDataSource>
@property(nonatomic) UITableView *tableView;
@property(nonatomic) NSMutableArray *data;
@property (nonatomic) LXTimeChooseView *timeView;
@property (nonatomic) NSInteger page;
@property (nonatomic) CGFloat topY;
@property (nonatomic) NSString *searchStr;
@property (nonatomic) LXStatisticsScreenView *screenView;
@property (nonatomic) NSArray *caiWuScreenAry;
@property (nonatomic) LXStatisticsPaymentCategoryView *topView;
@property (nonatomic) NSString *fundType;
@end

@implementation LXStatisticsListViewController
- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    
   
    if (kUserDefaultForBool(kRefreshStr)) {
        kUserDefaultSetBool(NO, kRefreshStr);
        [self.tableView.mj_header beginRefreshing];
    }
    
    
}
- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor colorWithHexString:@"#F7F8FA"];
    
    [self layoutCustomNav:self.view title:self.titleName];

    self.data = [NSMutableArray array];
    
    
    
    if (self.statisticsType == YZCL  ||
        self.statisticsType == XBYCL ||
        self.statisticsType == WXZCL ||
        self.statisticsType == XXBCL ||
        self.statisticsType == CXCL  ||
        self.statisticsType == YWZCL ||
        self.statisticsType == TCCL  ||
        self.statisticsType == XNJCL ||
        self.statisticsType == WYCL  ||
        self.statisticsType == DKCL  ||
        self.statisticsType == XJZKH ||
        self.statisticsType == JJDQKH||
        self.statisticsType == XTYJKH) {
        
        
        LXTopSearchView *searchView = [[LXTopSearchView alloc] initWithFrame:CGRectMake(0, kViewTopHeight, kScreenWidth, 70)];
        searchView.textField.placeholder = @"请输入车牌/型号进行搜索";
        searchView.backgroundColor = self.view.backgroundColor;
        [self.view addSubview:searchView];
        [searchView setClickBtnBlock:^(NSString * _Nonnull text) {
            [self.view endEditing:YES];
            self.searchStr = text;
            [self.tableView.mj_header beginRefreshing];
        }];
//        self.searchView = searchView;
        self.topY = searchView.Y_height;
        
    }
    // 应收款
    else if(self.statisticsType == YINGSK ||
            self.statisticsType == YINGFK ||
            self.statisticsType == YIFK   ||
            self.statisticsType == YISK){
        
        
        LXStatisticsPaymentCategoryView *topView = [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([LXStatisticsPaymentCategoryView class]) owner:self options:nil].firstObject;
        self.topView = topView;
        topView.frame = CGRectMake(0, kViewTopHeight, ScreenWidth, 70);
        topView.backgroundColor = UIColor.whiteColor;
        self.topY = topView.Y_height;
        [self.view addSubview:topView];
        [topView.searchLab whenTapped:^{
           
            self.searchStr = topView.textFiled.text;
            [self.tableView.mj_header beginRefreshing];
        }];
        [topView.categoryLab whenTapped:^{
                    
            [self clickCaiWuScreenBtnAction];
            
        }];
        
        [self.tableView registerNib:[UINib nibWithNibName:NSStringFromClass([LXYearCheckTableViewCell class]) bundle:nil] forCellReuseIdentifier:NSStringFromClass([LXYearCheckTableViewCell class])];

        
    }
    else {
        LXTimeChooseView *timeView = [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([LXTimeChooseView class]) owner:self options:nil][0];
        [timeView setClipsToBounds:YES];
        timeView.frame = CGRectMake(0, kViewTopHeight, ScreenWidth, 44);
        [self.view addSubview:timeView];
        self.timeView = timeView;
        
        if ([self.dateType isEqualToString:@"today"]) {
            self.startDate = [NSString getNowDateWithFormat:@"yyyy-MM-dd"];
            self.endDate = [NSString getNowDateWithFormat:@"yyyy-MM-dd"];
        }
        else if([self.dateType isEqualToString:@"week"]){
            NSArray *ary = [NSString getWeekBeginAndEndDate];
            self.startDate = ary.firstObject;
            self.endDate = ary.lastObject;
        }
        else if([self.dateType isEqualToString:@"month"]){
            NSArray *ary = [NSString getMonthBeginAndEndDate];
            self.startDate = ary.firstObject;
            self.endDate = ary.lastObject;
        }
        else if([self.dateType isEqualToString:@"custom"]){
            // 外面的传参
        }
        [timeView.leftTimeBtn setTitle:self.startDate forState:UIControlStateNormal];
        [timeView.rightTimeBtn setTitle:self.endDate forState:UIControlStateNormal];
       
        
        [timeView setClickCellBlock:^(NSString * _Nonnull value,int type) {
                    
            if (type == 1) {
                self.startDate = value;
            }
            else {
                self.endDate = value;
            }
            
            [self.tableView.mj_header beginRefreshing];
        }];
        self.topY = timeView.Y_height;

    }
    
    
    

    [self.view addSubview:self.tableView];
    
    
    
    
    self.tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
        self.page = 1;
        [self loadData];
    }];
    [self.tableView.mj_header beginRefreshing];
    self.tableView.mj_footer = [MJRefreshBackStateFooter footerWithRefreshingBlock:^{
         self.page++;
        [self loadData];
    }];
    

}


-(void)loadData{
    
    NSMutableDictionary *dic = @{
        @"page":@(self.page),
        @"rows":@(20),
        @"type":@(self.statisticsType),
    }.mutableCopy;

    if (!StringIsEmpty(self.startDate)) {
        [dic setValue:self.startDate forKey:@"startDate"];
    }
    if (!StringIsEmpty(self.endDate)) {
        [dic setValue:self.endDate forKey:@"endDate"];
    }
    if (!StringIsEmpty(self.searchStr)) {
        [dic setValue:self.searchStr forKey:@"key"];
    }
    if (!StringIsEmpty(self.fundType)) {
        [dic setValue:self.fundType forKey:@"fundType"];
    }
    
    
    
    
    [MSNetworkManager getRevertUrl:GET_GetCarStatisticsList params:dic success:^(id  _Nonnull paginationObj, id  _Nonnull resonseObj, BOOL isSuccess, NSString * _Nonnull message) {
        
        
        [self endRefreshing];
    
        if (isSuccess) {
            if (self.page==1) {
                [self.data removeAllObjects];
                
            }
            
            NSArray *list = resonseObj[@"records"];
            
            [self.data addObjectsFromArray:[CheLiangModel mj_objectArrayWithKeyValuesArray:list]];

            NSInteger totalPage = [resonseObj[@"total"] intValue];
            if (self.data.count>=totalPage) {
                [self.tableView.mj_footer endRefreshingWithNoMoreData];
            }
            
            [self.tableView reloadData];
        }
        [self isHaveEmptyData];
        
    } failure:^(NSUInteger code, NSString * _Nonnull message) {
        [self endRefreshing];
        [self isHaveEmptyData];
    } withShowHud:NO];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.data.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
   
    
    
    if(self.statisticsType == YINGSK ||
       self.statisticsType == YINGFK ||
       self.statisticsType == YIFK   ||
       self.statisticsType == YISK ){
        LXYearCheckTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([LXYearCheckTableViewCell class])];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        [cell setClipsToBounds:YES];
        CheLiangModel *model = self.data[indexPath.row];
        
        if(self.statisticsType == YINGFK ||
           self.statisticsType == YIFK) {
            model.statisticsType = self.statisticsType;
            cell.yfkModel = model;
        }
        else if(self.statisticsType == YINGSK ||
                self.statisticsType == YISK) {
            cell.yskModel = model;
        }
        

        return cell;
        
    }
    
    
    
    
    LXStatisticsListTableViewCell *cell = [self loadCellWithTableView:tableView WithIndexPath:indexPath];
 
    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    
    
    CheLiangModel *model = self.data[indexPath.row];
    if (self.statisticsType == XTYJKH ||
        (model.fundType == TYJKH && self.statisticsType == YINGFK)) {
        
        
        NSString *url = GET_GetDepositDetails;
       
        NSDictionary *dic =@{};
        if (self.statisticsType == XTYJKH) {
            dic = @{@"id":model.outId};
        }
        else {
            dic = @{@"id":model.ID};
        }
        [MSNetworkManager getRevertUrl:url params:dic success:^(id  _Nonnull paginationObj, id  _Nonnull resonseObj, BOOL isSuccess, NSString * _Nonnull message) {
            
            if (isSuccess) {
                LXDepositModel *depostiModel = [LXDepositModel mj_objectWithKeyValues:resonseObj];
                LXDepositApplyViewController *vc = [[LXDepositApplyViewController alloc] init];
                vc.depostiModel = depostiModel;
                vc.type = 1;
                if ([model.paidAmount doubleValue]>0) {
                    vc.type = 2;
                }
               
                [self pushToNextController:vc];
                
            }
            
        } failure:^(NSUInteger code, NSString * _Nonnull message) {
        } withShowHud:YES];
        
        
        return;
        LXDepositApplyViewController *vc = [[LXDepositApplyViewController alloc] init];
        
        LXDepositModel *depostiModel = [LXDepositModel new];
        depostiModel.carId = model.carId;
        depostiModel.carNum = model.carNum;
        depostiModel.carReturnTime = model.carReturnTime;
        depostiModel.customerName = model.customerName;
        depostiModel.amount = model.amount;
        depostiModel.ID = model.outId;
        vc.depostiModel = depostiModel;
        [self pushToNextController:vc];
    }
    else if(self.statisticsType == XXBCL ||
            self.statisticsType == XNJCL ||
            self.statisticsType == XBYCL ||
            self.statisticsType == WXZCL ||
            self.statisticsType == CXCL  ||
            self.statisticsType == TCCL  ||
            self.statisticsType == WYCL  ||
            self.statisticsType == DKCL){
        
        CheLiangDetailViewController *vc = [[CheLiangDetailViewController alloc] init];
        CheLiangModel *detailModel = [CheLiangModel new];
        detailModel.ID = model.carId;
        vc.detailModel = detailModel;
        [self pushToNextController:vc];
        
        
    }
    
    else if(self.statisticsType == YINGSK ||
            self.statisticsType == YISK   ||
            self.statisticsType == YINGFK ||
            self.statisticsType == YIFK   ||
            self.statisticsType == XJZKH){
        
       
        if (self.statisticsType == YINGSK ||
            self.statisticsType == YINGFK ||
            self.statisticsType == XJZKH) {
           
            
            
            
            if ((self.statisticsType== YINGSK && [model.receiveAmount doubleValue] != 0)||
                (self.statisticsType== YINGFK && [model.paidAmount doubleValue] != 0)
                 ||
                (self.statisticsType== XJZKH  && [model.receiveAmount doubleValue] != 0))
            {
                
                NSString *url;
                if (self.statisticsType == YINGFK ||
                    self.statisticsType == YINGFK) {
                    url = GET_TmoneyoutflowDetail;
                }
                else{
                    url = GET_TmoneyintoflowDetail;
                }
                
                
                [MSNetworkManager getRevertUrl:url params:@{@"id":model.ID} success:^(id  _Nonnull paginationObj, id  _Nonnull resonseObj, BOOL isSuccess, NSString * _Nonnull message) {
                    
                    if (isSuccess) {
                        CheLiangModel *model = [CheLiangModel mj_objectWithKeyValues:resonseObj];
                        LXCWApplyViewController *vc = [[LXCWApplyViewController alloc] init];
                        vc.model = model;
                        vc.type = 1;
                        vc.statisticsType = [self getStatisticsType];
                        [self pushToNextController:vc];
                        
                    }
                    
                } failure:^(NSUInteger code, NSString * _Nonnull message) {
                } withShowHud:YES];
                
                
                
                
                
            
            }
            else {
                LXCWApplyViewController *vc = [[LXCWApplyViewController alloc] init];
                vc.model = model;
                vc.statisticsType = [self getStatisticsType];
                [self pushToNextController:vc];
            }
        
            
           
            
        }
        else{
            
            LXCWDetailViewController *vc = [[LXCWDetailViewController alloc] init];
            vc.model = model;
            vc.statisticsType = self.statisticsType;
            [self pushToNextController:vc];
        }
        
    }
    else if(self.statisticsType == XJZKH){
        
        
        
        
        
    }
    else if(self.statisticsType == JJDQKH){
        
        
        LXSignContractDetailViewController *vc = [[LXSignContractDetailViewController alloc] init];
        vc.signContractModel = self.data[indexPath.row];
        vc.fromVc = NSStringFromClass([self class]);
        [self pushToNextController:vc];
        
        
    }

}
// 1 收款 2付款
-(NSInteger)getStatisticsType{
    
    if (self.statisticsType == YINGSK ||
        self.statisticsType == XJZKH) {
        return 1;
    }
    else if(self.statisticsType == YINGFK){
        return 2;
    }
    return 1;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
//     if(self.statisticsType == XNJCL){
//        return 105;
//    }
    return UITableViewAutomaticDimension;
}

- (UITableView *)tableView{
    if (!_tableView) {
        _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, self.topY, ScreenWidth, kScreenHeight - self.topY) style:UITableViewStylePlain];
        _tableView.delegate = self;
        _tableView.dataSource = self;
        _tableView.tableFooterView = [UIView new];
        _tableView.estimatedRowHeight = 100;
        _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
        _tableView.backgroundColor = [UIColor colorWithHexString:@"#F7F8FA"];
    }
    return _tableView;
}
- (void)endRefreshing{
    if ([self.tableView.mj_header isRefreshing]) {
        [self.tableView.mj_header endRefreshing];
        self.tableView.mj_header.state = MJRefreshStateIdle;
        [self.tableView.mj_footer resetNoMoreData];
    }
    if ([self.tableView.mj_footer isRefreshing]) {
        [self.tableView.mj_footer endRefreshing];
    }

}
- (void)isHaveEmptyData{
    if (self.data.count == 0) {
        self.tableView.startTip = YES;
        self.tableView.tipView.backgroundColor = self.tableView.backgroundColor;
        self.tableView.tipImage = [UIImage imageNamed:@"No_order_icon"];
        self.tableView.tipView.hidden = NO;
        self.tableView.scrollEnabled = YES;
    }else{
        self.tableView.tipView.hidden = YES;
        self.tableView.scrollEnabled = YES;
    }
}
-(LXStatisticsListTableViewCell *)loadCellWithTableView:(UITableView *)tableView WithIndexPath:(NSIndexPath *)indexPath{
    
 
    
    
    CheLiangModel *model = self.data[indexPath.row];
    
    
    static NSString *identifier = @"cell";

    
    if (self.statisticsType == DKCL) {
        LXStatisticsListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
        if (cell==nil) {
            cell = [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([LXStatisticsListTableViewCell class]) owner:self options:nil] objectAtIndex:0];
            cell.selectionStyle = UITableViewCellSelectionStyleNone;
        }
        if(self.statisticsType == DKCL){
            cell.dkclModel = model;
        }
        return cell;
    }
    else if(self.statisticsType == XTYJKH ||
            self.statisticsType == TYJKH  ||
            self.statisticsType == WXZCL  ||
            self.statisticsType == TCCL   ||
            self.statisticsType == JZKH   ||
            self.statisticsType == XJZKH  ||
            self.statisticsType == JJDQKH ||
            self.statisticsType == CXCL){
        LXStatisticsListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
        if (cell==nil) {
            cell = [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([LXStatisticsListTableViewCell class]) owner:self options:nil] objectAtIndex:1];
            cell.selectionStyle = UITableViewCellSelectionStyleNone;
        }
        
        if (self.statisticsType == XTYJKH) {
            cell.xtyjModel = model;
            [cell.btn7_cell2 whenTapped:^{
                [NSString callPhone:model.customerPhone];
            }];
        }
       else if (self.statisticsType == TYJKH) {
            cell.tyjkhModel = model;
            [cell.btn7_cell2 whenTapped:^{
                [NSString callPhone:model.customerPhone];
            }];
        }
        else if (self.statisticsType == XJZKH) {
            cell.xjzkhModel = model;
            [cell.btn7_cell2 whenTapped:^{
                [NSString callPhone:model.customerPhone];
            }];
        }
        else if (self.statisticsType == JJDQKH) {
            cell.jjdqkhModel = model;
            [cell.btn7_cell2 whenTapped:^{
                [NSString callPhone:model.customerPhone];
            }];
        }
        else if (self.statisticsType == WXZCL) {
            cell.wxzclModel = model;
        }
        else if (self.statisticsType == TCCL) {
            cell.tcclModel = model;
        }
        else if(self.statisticsType == JZKH) {
            cell.jzkhModel = model;
            [cell.btn7_cell2 whenTapped:^{
                [NSString callPhone:model.customerPhone];
            }];
        }
       else if (self.statisticsType == CXCL) {
             cell.cxclModel = model;
         }
        
        return cell;
    }
    else if(self.statisticsType == TZCL  ||
            self.statisticsType == XXBCL ||
            self.statisticsType == XBYCL ){
        LXStatisticsListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
        if (cell==nil) {
            cell = [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([LXStatisticsListTableViewCell class]) owner:self options:nil] objectAtIndex:2];
            cell.selectionStyle = UITableViewCellSelectionStyleNone;
        }
        
        if(self.statisticsType == TZCL) {
            cell.tzclModel = model;
        }
        else if(self.statisticsType == XXBCL) {
            cell.xxbclModel = model;
        }
        else if(self.statisticsType == XBYCL) {
            cell.xbyclModel = model;
        }
    
        
        return cell;
    }
    else if (self.statisticsType == XNJCL ||
             self.statisticsType == WYCL) {
        LXStatisticsListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
        if (cell==nil) {
            cell = [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([LXStatisticsListTableViewCell class]) owner:self options:nil] objectAtIndex:3];
            cell.selectionStyle = UITableViewCellSelectionStyleNone;
        }
        
        if(self.statisticsType == XNJCL) {
            cell.xnjModel = model;
        }
        if(self.statisticsType == WYCL) {
            cell.wyclModel = model;
        }
        
        
        return cell;
    }
//    else  if (self.statisticsType == CXCL) {
//         LXStatisticsListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
//         if (cell==nil) {
//             cell = [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([LXStatisticsListTableViewCell class]) owner:self options:nil] objectAtIndex:4];
//             cell.selectionStyle = UITableViewCellSelectionStyleNone;
//         }
//
//        if (self.statisticsType == CXCL) {
//             cell.cxclModel = model;
//         }
//
//
//         return cell;
//    }
    return nil;
}


- (LXStatisticsScreenView *)screenView{
    if (!_screenView) {
        _screenView = [[LXStatisticsScreenView alloc] initWithFrame:CGRectMake(0, kViewTopHeight + 50, ScreenWidth, kScreenHeight - kViewTopHeight - 50)];
        [self.view addSubview:_screenView];
    }
    return _screenView;
}
// MARK: 财务统计 筛选
-(void)clickCaiWuScreenBtnAction{
    
    
    // 选中状态下
    if ([self.topView.categoryLab.textColor isEqual:ColorWith3C6CFC]) {
        self.topView.categoryLab.textColor = UIColor.blackColor;
        [self.screenView removeFromSuperview];
        self.screenView  = nil;
        return;
    }
    
    self.topView.categoryLab.textColor = ColorWith3C6CFC;
    
    self.screenView.data =  self.caiWuScreenAry;
    WEAKSELF
    [self.screenView setClickCellBlock:^(LXStatisticsModel * _Nonnull model) {
        
        weakSelf.topView.categoryLab.textColor = UIColor.blackColor;

        
        [weakSelf.screenView removeFromSuperview];
        weakSelf.screenView  = nil;
        
        if (ObjectIsEmpty(model))return;
        
        
        weakSelf.topView.categoryLab.text = model.name;

        
        weakSelf.fundType = model.funtype;
        
        [weakSelf.tableView.mj_header beginRefreshing];
        
    }];
}

- (NSArray *)caiWuScreenAry{
    if (!_caiWuScreenAry) {
        
        NSArray *ary;
        
        if (self.statisticsType == YINGSK ||
            self.statisticsType == YISK) {
            
            ary  = @[
                @{
                    @"name":@"全部",
                    @"isSel":@(YES),
                    @"funtype":@""
                },
                @{
                    @"name":@"租金",
                    @"isSel":@(NO),
                    @"funtype":@"0"
                },
                @{
                    @"name":@"租车押金",
                    @"isSel":@(NO),
                    @"funtype":@"1"
                },
                @{
                    @"name":@"购车首付",
                    @"isSel":@(NO),
                    @"funtype":@"2"
                },
                @{
                    @"name":@"购车月供",
                    @"isSel":@(NO),
                    @"funtype":@"3"
                },
                @{
                    @"name":@"购车尾款",
                    @"isSel":@(NO),
                    @"funtype":@"4"
                },
                @{
                    @"name":@"平台返佣",
                    @"isSel":@(NO),
                    @"funtype":@"5"
                },
                @{
                    @"name":@"保险赔付",
                    @"isSel":@(NO),
                    @"funtype":@"6"
                },
                @{
                    @"name":@"保险费",
                    @"isSel":@(NO),
                    @"funtype":@"7"
                },
                @{
                    @"name":@"违约金",
                    @"isSel":@(NO),
                    @"funtype":@"8"
                },
                @{
                    @"name":@"其他",
                    @"isSel":@(NO),
                    @"funtype":@"9"
                },
                @{
                    @"name":@"车贷",
                    @"isSel":@(NO),
                    @"funtype":@"10"
                },
                @{
                    @"name":@"介绍费",
                    @"isSel":@(NO),
                    @"funtype":@"11"
                },
                @{
                    @"name":@"牌照费",
                    @"isSel":@(NO),
                    @"funtype":@"12"
                },
    
            ];
        }
        
        else {
            
            
            ary = @[
                @{
                    @"name":@"全部",
                    @"isSel":@(YES),
                    @"funtype":@""
                },
                @{
                    @"name":@"车贷",
                    @"isSel":@(NO),
                    @"funtype":@"0"
                },
                @{
                    @"name":@"购车款(全款)",
                    @"isSel":@(NO),
                    @"funtype":@"1"
                },
                @{
                    @"name":@"保险费用",
                    @"isSel":@(NO),
                    @"funtype":@"2"
                },
                @{
                    @"name":@"年检费用",
                    @"isSel":@(NO),
                    @"funtype":@"3"
                },
                @{
                    @"name":@"租车押金退还",
                    @"isSel":@(NO),
                    @"funtype":@"4"
                },
                @{
                    @"name":@"签约佣金",
                    @"isSel":@(NO),
                    @"funtype":@"5"
                },
                @{
                    @"name":@"车辆维修",
                    @"isSel":@(NO),
                    @"funtype":@"6"
                },
                @{
                    @"name":@"保养费",
                    @"isSel":@(NO),
                    @"funtype":@"7"
                },
                @{
                    @"name":@"中介费",
                    @"isSel":@(NO),
                    @"funtype":@"8"
                },
                @{
                    @"name":@"牌照费",
                    @"isSel":@(NO),
                    @"funtype":@"9"
                },
                @{
                    @"name":@"租金",
                    @"isSel":@(NO),
                    @"funtype":@"10"
                },
                @{
                    @"name":@"违约金",
                    @"isSel":@(NO),
                    @"funtype":@"11"
                },
                @{
                    @"name":@"保险理赔款",
                    @"isSel":@(NO),
                    @"funtype":@"12"
                },
             
            ];
        }
        
        
        _caiWuScreenAry = [LXStatisticsModel mj_objectArrayWithKeyValuesArray:ary];


    }
    return _caiWuScreenAry;
}

@end
